package com.hxzy.mapper;

import com.hxzy.entity.AdminUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.Set;

/**
 * AdminUserMapper继承基类
 */
@Mapper
@Repository
public interface AdminUserMapper extends MyBatisBaseDao<AdminUser, Integer> {
    AdminUser selectByUserName(String username);

    /**
     * 根据用户id查询 它拥有角色权限
     * @param userId
     * @return
     */
    Set<String> findOwnRole( Integer userId);

    /**
     * 根据用户id查询拥有的角色的菜单
     * @param userId
     * @return
     */
    Set<String> findOwnRoleOwnMenu( Integer userId);
}